package jfae.core.properties.parsers.annotation;

import jfae.core.annotations.Editable;
import jfae.core.properties.FieldInfo;
import jfae.core.properties.parsers.execution.constraints.ExecuteAfter;

//TODO: inserire un sistema di constraints per l'ordine di 
//esecuzione degli annotation handlers
@ExecuteAfter(ColumnHandler.class) // potrebbe essere una delle constraints
public class EditableHandler implements AnnotationHandler<Editable> {

	@Override
	public void handle(Editable annotation, FieldInfo<?> info) {
		info.setOrder(annotation.order());
		info.setGroups(annotation.groupNames());
	}

	@Override
	public Class<Editable> getType() {
		return Editable.class;
	}

}
